//准备actions——用于响应组件中的动作
const actions = {
}
//准备mutations——用于操作数据（state）
const mutations = {
    setSearch(state, val) {
        state.search = val;
    },
    setNewNums(state, val) {
        state.newsNums = val;
    }
}
//准备state——用于存储数据
const state = {
    search: "",
    newsNums: ""
}

//创建并暴露store
export default {
    actions,
    mutations,
    state,
}